var loadindex=layer.load(1,{
    shade:[0.9,'#000']
})
var pageSize=6
$.get('./php/list.php',res=>{
console.log(res);
var {meta:{status,msg},data}=res;
if(status===1){
    new Page('fenye',{
        pageData:{
            total:data.length,
            pageSize
        },
        show:function(currentPage){
            var arr=data.slice((currentPage-1)*pageSize,currentPage*pageSize)
            var str=''
            for(var i=0;i<arr.length;i++){
                str+=`
                <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
                    <div class="thumbnail">
                    <a href="./detail.html?id=${arr[i].id}"><img src="${arr[i].imgpath.split('=====')[0]}" alt="..."></a>
                        <div class="caption">
                            <h3>${arr[i].name}</h3>
                    <p class="box1-p2">
                        <span class="box1-s1">￥</span>
                        <span class="box1-s2">${arr[i].price}</span>
                        <span class="box1-s3">起</span>
                        <span class="box1-s4">${arr[i].introduce}</span>
                    </p>
                        </div>
                    </div>
                    </div>
                
                `
            }
            $('.goods .row').html(str)
        }
    })
    // var str='';
    
    
}
layer.close(loadindex)
},'json')